package com.neusoft.sysdata.mapper;

import org.apache.ibatis.annotations.Select;
import com.neusoft.sysdata.entity.MdDept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * @Description: MD_DEPT
 * @Author: jeecg-boot
 * @Date:   2019-12-09
 * @Version: V1.0
 */
public interface MdDeptMapper extends BaseMapper<MdDept> {
    @Select("SELECT * FROM MD_DEPT WHERE STATUS=1 AND COMPANY_ID = #{code,jdbcType=VARCHAR} AND (PARENT_DEPT = #{code,jdbcType=VARCHAR} or PARENT_DEPT = #{pid,jdbcType=VARCHAR})")
    public List<MdDept> selectDeptInfo(String code, String pid);
    @Select("SELECT * FROM MD_DEPT WHERE STATUS=1 AND COMPANY_ID = #{code,jdbcType=VARCHAR} AND PARENT_DEPT = #{pid,jdbcType=VARCHAR}")
    public List<MdDept> selectComDeptInfo(String code, String pid);
    @Select("SELECT * FROM MD_DEPT WHERE STATUS=1 AND PARENT_DEPT = #{code,jdbcType=VARCHAR}")
    public List<MdDept> selectPDeptInfo(String code);
}
